import request from '@/utils/request'

// 查询专家列表
export function listExpert(query) {
  return request({
    url: '/expert/expert/list',
    method: 'get',
    params: query
  })
}

// 查询专家详细
export function getExpert(id) {
  return request({
    url: '/expert/expert/' + id,
    method: 'get'
  })
}

// 新增专家
export function addExpert(data) {
  return request({
    url: '/expert/expert',
    method: 'post',
    data: data
  })
}

// 修改专家
export function updateExpert(data) {
  return request({
    url: '/expert/expert',
    method: 'put',
    data: data
  })
}

// 删除专家
export function delExpert(id) {
  return request({
    url: '/expert/expert/' + id,
    method: 'delete'
  })
}

// 开通服务
export function updateExpertSet(data) {
  return request({
    url: '/expert/expert/editSet',
    method: 'put',
    data: data
  })
}

// 根据单位查询科室
// export function deptGetChildren(params) {
//   return request({
//     url: '/system/dept/children/get',
//     method: 'get',
//     params
//   })
// }

// 查询专家关联辩证路径列表
export function getExpertAssocList(query) {
  return request({
    url: '/tcm-disease/expert/assoc/list',
    method: 'get',
    params: query
  })
}

// 专家添加关联辩证路径
export function addExpertAssoc(data) {
  return request({
    url: '/tcm-disease/expert/assoc/add',
    method: 'post',
    data: data
  })
}

// 专家删除关联辩证路径
export function deleteExpertAssoc(data) {
  return request({
    url: '/tcm-disease/expert/assoc/delete',
    method: 'post',
    data: data
  })
}
